package co.fitstart.admin.service;

import java.util.Date;
import java.util.List;
import java.util.Set;

import com.demo2do.core.support.Page;

import co.fitstart.admin.entity.report.BodyReport;
import co.fitstart.admin.entity.search.SiteStudentSearch;
import co.fitstart.admin.entity.security.Login;
import co.fitstart.admin.entity.search.OfflineStudentSearch;
import co.fitstart.admin.entity.search.OnlineStudentSearch;
import co.fitstart.entity.course.round.CourseRound;
import co.fitstart.entity.course.schedule.CourseSchedule;
import co.fitstart.entity.finance.StudentExportRecord;
import co.fitstart.entity.site.Site;
import co.fitstart.entity.user.Student;
import co.fitstart.entity.user.StudentTargetData;
import co.fitstart.entity.user.User;
import co.fitstart.entity.user.UserTargetData;
import co.fitstart.entity.user.bwh.BwhRecord;
import co.fitstart.entity.user.inbody.InbodyRecord;
import co.fitstart.entity.user.investigation.FitInvestigation;
import co.fitstart.entity.user.investigation.HealthInvestigation;
import co.fitstart.entity.user.investigation.ParticipateInvestigation;

/**
 * 
 * @author mohanlan
 *
 */
public interface StudentService extends DataService<Student> {

    /**
     * 
     * @param page
     * @return
     */
    public List<Student> list(boolean export, Page page);

    /**
     * 
     * @return
     */
    public List<Student> listUnExportStudent();

    // public int count(CourseType type);

    /**
     * List student by type and page
     * 
     * @param type
     * @param page
     * @return
     */
    public List<Student> list(String type, Page page);

    /**
     * 
     * @param site
     * @param page
     * @return
     */
    public List<Student> list(Site site, Page page);

    /**
     * 
     * @param sites
     * @param page
     * @return
     */
    public List<Student> list(List<Site> sites, Page page);

    /**
     * 
     * @param studentSearch
     * @param page
     * @return
     */
    public List<Student> onlineStudentSearch(OnlineStudentSearch studentSearch, Page page);

    /**
     * 
     * @param studentSearch
     * @param page
     * @return
     */
    public List<Student> offlineStudentSearch(OfflineStudentSearch studentSearch, Page page);

    /**
     * 
     * @param siteStudentSearch
     * @param page
     * @return
     */
    public List<Student> search(SiteStudentSearch siteStudentSearch, Page page);
    
    /**
     * 
     * @param mobile
     * @return
     */
    public Student load(String mobile);

    /**
     * 
     * @param type
     * @param mobile
     * @return
     */
    public Student load(String type, String mobile);

    /**
     * 
     * @param user
     * @return
     */
    public Student load(User user);

    /**
     * 
     * @param type
     * @param mobile
     * @param site
     * @return
     */
    public Student load(String mobile, Site site);
    
    /**
     * 
     * @param mobile
     * @param sites
     * @return
     */
    public Student load(String mobile, List<Site> sites);

    /**
     * list fitInvestigation by user
     * 
     * @param user
     * @return
     */
    public List<FitInvestigation> listFitInvestigation(User user);

    /**
     * list InbodyRecord by user
     * 
     * @param user
     * @return
     */
    public List<InbodyRecord> listInbodyRecord(User user);

    /**
     * 
     * @param user
     * @return
     */
    public List<BwhRecord> listBwhRecord(User user);

    /**
     * 
     * @param bwhId
     * @return
     */
    public BwhRecord getBwhRecord(Long bwhId);

    /**
     * 
     * @param bwhRecord
     */
    public void editBwhRecord(BwhRecord bwhRecord);

    /**
     * 
     * @param user
     * @return
     */
    public List<StudentTargetData> listStudentTargetData(User user);

    /**
     * 
     * @param user
     * @return
     */
    public UserTargetData listUserTargetData(User user);

    /**
     * @param student
     * @param courseRound
     * @return
     */
    public List<StudentTargetData> listStudentTargetData(Student student, CourseRound courseRound);

    /**
     * load HealthInvestigation by user
     * 
     * @param user
     * @return
     */
    public HealthInvestigation loadHealthInvestigation(User user);

    /**
     * load ParticipateInvestigation by user
     * 
     * @param user
     * @return
     */
    public ParticipateInvestigation loadParticipateInvestigation(User user);

    /**
     * 
     * @param userTargetData
     * @param user
     */
    public void editUserTargetData(UserTargetData userTargetData, User user);

    /**
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Student> exportUserInformation(Site site, Date startTime, Date endTime);
    
    /**
     * 
     * @param sites
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Student> exportUserInformation(List<Site> sites, Date startTime, Date endTime);

    /**
     * 
     * @param type
     * @param startTime
     * @param endTime
     * @return
     */
    public List<Student> exportUserInformation(String type, Date startTime, Date endTime);

    /**
     * 
     * @param students
     * @return
     */
    public List<CourseRound> exportConsumingBehavior(List<Student> students);

    /**
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CourseSchedule> exportCourseDetail(List<Student> students);

    /**
     * @param startTime
     * @param endTime
     * @return
     */
    public List<BodyReport> exportBodyData(List<Student> students);

    /**
     * 
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CourseRound> exportFreezingCourseDetails(List<Student> students);

    /**
     * 
     * @param student
     */
    public void editName(Student student);
    
    /**
     * 
     * @param studentIds
     * @param login
     */
    public void exportArchives(List<Long> studentIds, Login login);

    /**
     * 
     * @param page
     * @return
     */
    public List<StudentExportRecord> listExportRecord(Page page);

    /**
     * 
     * @param bwhRecord
     */
    public void createBwhRecord(BwhRecord bwhRecord);
    
    /**
     * 
     * @param target
     */
    public void editTarget(StudentTargetData target);
    
    /**
     * 
     * @param mobiles
     * @return
     */
    public List<Student> list(Set<String> mobiles);
}
